/// 健康问卷答案模型
class HealthQuestionAnswer {
  final int questionId;
  final String questionAnswer;

  HealthQuestionAnswer({
    required this.questionId,
    required this.questionAnswer,
  });

  Map<String, dynamic> toJson() {
    return {
      'questionId': questionId,
      'questionAnswer': questionAnswer,
    };
  }
}

/// 健康问卷数据模型
class HealthQuestionnaireData {
  // final String deviceSn;
  final String sex;
  final int height;
  final int weight;
  final String birthday;
  final String career;
  final List<HealthQuestionAnswer> exerciseList;
  final List<HealthQuestionAnswer> sleepList;
  final List<HealthQuestionAnswer> dietList;
  final List<HealthQuestionAnswer> emotionList;
  final List<HealthQuestionAnswer> periodList;

  HealthQuestionnaireData({
    // required this.deviceSn,
    required this.sex,
    required this.height,
    required this.weight,
    required this.birthday,
    required this.career,
    required this.exerciseList,
    required this.sleepList,
    required this.dietList,
    required this.emotionList,
    required this.periodList,
  });

  Map<String, dynamic> toJson() {
    return {
      // 'deviceSn': deviceSn,
      'sex': sex,
      'height': height,
      'weight': weight,
      'birthday': birthday,
      'career': career,
      'exerciseList': exerciseList.map((e) => e.toJson()).toList(),
      'sleepList': sleepList.map((e) => e.toJson()).toList(),
      'dietList': dietList.map((e) => e.toJson()).toList(),
      'emotionList': emotionList.map((e) => e.toJson()).toList(),
      'periodList': periodList.map((e) => e.toJson()).toList(),
    };
  }
}

